import http from './api.js';

export function login(loginname:string,password:string){
    let userApi = "/api/user/login";
    return http({
        url: userApi,
        method:'post',
        data:{ loginname, password }
    });
}
export function register(loginname:string,password:string){
    return http({
        url: "/api/user/reg",
        method:'post',
        data:{ loginname, password }
    });
}
export function info(userid:string){
    return http({
        url: "/api/user/info",
        method:'post',
        data:{ userid }
    });
}